using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._SAS
{
    /// <summary>
    /// <para>SAS To Table</para>
    /// <para>Converts a SAS dataset to a table.</para>
    /// <para>将 SAS 数据集转换为表。</para>
    /// </summary>    
    [DisplayName("SAS To Table")]
    public class SASToTable : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SASToTable()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_sas_dataset">
        /// <para>Input SAS Dataset (libref.tablename)</para>
        /// <para>The input SAS dataset. Provide the dataset in the form libref.tablename in which libref is the name of a SAS library and tablename is the name of the SAS dataset.</para>
        /// <para>输入 SAS 数据集。以 libref.tablename 的形式提供数据集，其中 libref 是 SAS 库的名称，tablename 是 SAS 数据集的名称。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para>The output table.</para>
        /// <para>输出表。</para>
        /// </param>
        public SASToTable(object _in_sas_dataset, object _out_table)
        {
            this._in_sas_dataset = _in_sas_dataset;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "SAS To Table";

        public override string CallName => "conversion.SASToTable";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_sas_dataset, _out_table, _use_cas_connection.GetGPValue(), _hostname, _port, _username, _password];

        /// <summary>
        /// <para>Input SAS Dataset (libref.tablename)</para>
        /// <para>The input SAS dataset. Provide the dataset in the form libref.tablename in which libref is the name of a SAS library and tablename is the name of the SAS dataset.</para>
        /// <para>输入 SAS 数据集。以 libref.tablename 的形式提供数据集，其中 libref 是 SAS 库的名称，tablename 是 SAS 数据集的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input SAS Dataset (libref.tablename)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_sas_dataset { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para>The output table.</para>
        /// <para>输出表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Download SAS Dataset from SAS Cloud Analytic Services (CAS)</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the input SAS dataset will be downloaded from CAS or accessed from a local SAS library.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Checked—The input SAS dataset will be downloaded from CAS.</bullet_item><para/>
        ///       <bullet_item>Unchecked—The input SAS dataset will be accessed from a local SAS library. This is the default.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是从 CAS 下载输入 SAS 数据集还是从本地 SAS 库访问输入 SAS 数据集。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>选中 - 将从 CAS 下载输入 SAS 数据集。</bullet_item><para/>
        ///       <bullet_item>未选中 - 将从本地 SAS 库访问输入 SAS 数据集。这是默认设置。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Download SAS Dataset from SAS Cloud Analytic Services (CAS)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_cas_connection_value _use_cas_connection { get; set; } = _use_cas_connection_value._false;

        public enum _use_cas_connection_value
        {
            /// <summary>
            /// <para>USE_CAS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_CAS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>LOCAL_SAS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LOCAL_SAS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>CAS Hostname URL</para>
        /// <para>The URL of the CAS host.</para>
        /// <para>CAS 主机的 URL。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("CAS Hostname URL")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _hostname { get; set; } = null;


        /// <summary>
        /// <para>Port</para>
        /// <para>The port of the CAS connection.</para>
        /// <para>CAS 连接的端口。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Port")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _port { get; set; } = null;


        /// <summary>
        /// <para>CAS Username</para>
        /// <para>The user name for the CAS connection.</para>
        /// <para>CAS 连接的用户名。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("CAS Username")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _username { get; set; } = null;


        /// <summary>
        /// <para>Password</para>
        /// <para>The password for the CAS connection. This password is hidden and not accessible after running the tool.</para>
        /// <para>CAS 连接的密码。此密码处于隐藏状态，运行该工具后无法访问。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _password { get; set; } = null;


        public SASToTable SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}